
package com.zy.ems.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.zy.ems.common.base.BaseEntity;

public class MemberPaperRecordItemEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * ID(db_column: item_id)
     */
    private Integer itemId;

    /**
     * 父表ID(db_column: record_id)
     */
    private Integer recordId;

    /**
     * 试卷ID(db_column: paper_id)
     */
    private Integer paperId;

    /**
     * 试卷包含题目,json对象，包含题目ID以及所得分数(db_column: question_ids)
     */
    private String questionIds;

    /**
     * 答错题目ID(db_column: wrong_question_ids)
     */
    private String wrongQuestionIds;


    public MemberPaperRecordItemEntity(){
    }

    public MemberPaperRecordItemEntity(
            Integer itemId
            ){
        this.itemId = itemId;
    }


    public Integer getItemId() {
        return this.itemId;
    }

    public void setItemId(Integer value) {
        this.itemId = value;
    }

    public Integer getRecordId() {
        return this.recordId;
    }

    public void setRecordId(Integer value) {
        this.recordId = value;
    }

    public Integer getPaperId() {
        return this.paperId;
    }

    public void setPaperId(Integer value) {
        this.paperId = value;
    }

    public String getQuestionIds() {
        return this.questionIds;
    }

    public void setQuestionIds(String value) {
        this.questionIds = value;
    }

    public String getWrongQuestionIds() {
        return this.wrongQuestionIds;
    }

    public void setWrongQuestionIds(String value) {
        this.wrongQuestionIds = value;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ItemId", getItemId())
            .append("RecordId", getRecordId())
            .append("PaperId", getPaperId())
            .append("QuestionIds", getQuestionIds())
            .append("WrongQuestionIds", getWrongQuestionIds())
            .toString();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getItemId())
            .toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if(!(obj instanceof MemberPaperRecordItemEntity)) {
            return false;
        }
        if(this == obj) {
            return true;
        }
        MemberPaperRecordItemEntity other = (MemberPaperRecordItemEntity) obj;
        return new EqualsBuilder()
            .append(getItemId(), other.getItemId())
            .isEquals();
    }
}

